<?php

session_start();
header("Content-Type: text/html; charset=utf-8");

//web root
define("WEBROOT", realpath(dirname(__file__)) . DIRECTORY_SEPARATOR);
chdir(WEBROOT);
//system root
define("SYSROOT", realpath('system/') . DIRECTORY_SEPARATOR);
//require context helper
require (SYSROOT . "utils" . DIRECTORY_SEPARATOR . 'Context.class.php');
//use context to register something: include_path, autoload and config
$config = require (WEBROOT . 'config.php');

require_once SYSROOT . 'common' . DIRECTORY_SEPARATOR . 'function.inc.php';


if ($config['is_test'])
{
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
} else
{
    error_reporting(0);
    ini_set("display_errors", 0);
}

Context::register($config);

define("SITE_TITLE", "长途吧");
define("SITE_LOGO", "#");
define("SITE_DESC", "长途吧");
define("SITE_ID", "1");
